import request from '@/utils/request'

// 查询特色商品列表
export function listCharacteristic(query) {
  return request({
    url: '/system/characteristic/list',
    method: 'get',
    params: query
  })
}

// 查询特色商品详细
export function getCharacteristic(id) {
  return request({
    url: '/system/characteristic/' + id,
    method: 'get'
  })
}

// 新增特色商品
export function addCharacteristic(data) {
  return request({
    url: '/system/characteristic',
    method: 'post',
    data: data
  })
}

// 修改特色商品
export function updateCharacteristic(data) {
  return request({
    url: '/system/characteristic',
    method: 'put',
    data: data
  })
}

// 删除特色商品
export function delCharacteristic(id) {
  return request({
    url: '/system/characteristic/' + id,
    method: 'delete'
  })
}

// 导出特色商品
export function exportCharacteristic(query) {
  return request({
    url: '/system/characteristic/export',
    method: 'get',
    params: query
  })
}